package com.lynx.system.feign;

import com.lynx.system.beans.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "order")
public interface OrderFeign {
    @PostMapping("/order/save")
    public void save(@RequestBody Order order);
    @GetMapping("/order/findOrdersByUid/{uid}/{index}/{limit}")
    public List<Order> findOrdersByUid(@PathVariable long uid, @PathVariable int index, @PathVariable int limit);
    @GetMapping("/order/findCountByUid/{uid}")
    public int findCountByUid(@PathVariable long uid);
    @GetMapping("/order/findOrdersByState/{state}/{index}/{limit}")
    public List<Order> findOrdersByState(@PathVariable int state,
                                         @PathVariable int index,
                                         @PathVariable int limit);
    @PutMapping("/order/editState/{id}")
    public void editState(@PathVariable long id);
    @GetMapping("/order/findCountByState/{state}")
    public int findCountByState(@PathVariable int state);
}
